<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>会员注册</title>
<link rel="stylesheet" type="text/css"
	href="<%=request.getContextPath() %>/resources/css/register.css">
</head>
<body>
	<p class="toindex">
		<a href="<%=request.getContextPath() %>/index">首页&nbsp;>></a>&nbsp;注册
	</p>
	<h2 class="title">用户注册</h2>
	<div class="center">
		<img
			src="<%=request.getContextPath() %>/resources/login_img/login_pic.jpg">
		<form action="register" method="post" class="register_form">
			<%
  			Object succ=request.getAttribute("succ_mes");
  			Object erro=request.getAttribute("erro_mes");
  			Object exist=request.getAttribute("exist");
  			if(succ!=null){
  		 %>
			<div class="succ">
				注册成功<span id="su"></span>
			</div>
			<script type="text/javascript">
			
  		 			var ospan=document.getElementById('su');
  		 			var i=5;
  		 			ospan.innerHTML=i+"秒后跳转到登录页面";
  		 			setInterval(function() {
  		 				i--;
  		 				ospan.innerHTML=i+"秒后跳转到登录页面";
  		 				if(i==0){
  		 					location.href="<%=request.getContextPath() %>/ToLogin";
  		 				}
  		 			}, 1000)
  		 		</script>
			<%
  		 	}
  		  %>
			<% 
  		  		if(erro!=null){
  		  	%>
			<div class="erro">注册失败，请检查所填信息</div>
			<%
  		  		}
  		  	 %>
			<% 
  		  		if(exist!=null){
  		  	%>
			<div class="exist">用户名已存在</div>
			<%
  		  		}
  		  	 %>
			用&nbsp;户&nbsp;名:&nbsp;<input type="text" name="username"
				placeholder="请输入用户名"> <br> 密&nbsp;&nbsp;&nbsp;&nbsp;码：<input
				type="password" name="password" placeholder="请输入8-20位密码"> <br>
			确认密码：<input type="password" name="repassword" placeholder="请再次输入密码">
			<br> &nbsp;&nbsp;&nbsp;<input type="checkbox" name="checkbox">同意《财浙旅行社服务协议》
			<br> <input class="register_btn" type="submit" value="同意协议并注册"
				name="register_btn">
		</form>
	</div>

	<div class="foot">
		<a href="###">服务说明丨</a><a href="###">关于财浙丨</a><a href="###">诚聘英才丨</a><a
			href="###">代理合作丨</a><a href="###">广告业务丨</a><a href="###">联系我们丨</a><a
			href="###">我要提建议</a> <br> <span>Copyright © SCZY 财浙旅行社</span>
	</div>
</body>
</html>